#pragma once
#include <MsHTML.h>
#include <xmllite.h>

#include <string>
#include <utility>
#include <vector>
#include <memory>

using std::wstring;
using std::pair;
using std::vector;
using std::unique_ptr;

class CMiscellaneous
{
public:
	CMiscellaneous(void);
	~CMiscellaneous(void);

	static wstring GetSettingFile(void) throw(...);
	static wstring GetAttributeValue(IXmlReader* pReader, const wchar_t* key) throw(...);
	static wstring GetLocalName(IXmlReader* pReader) throw(...);
	static wstring GetValue(IXmlReader* pReader) throw(...);
	static pair<wstring, wstring> CMiscellaneous::GetAttributePair(IXmlReader* pReader) throw(...);
	static void RaiseEvent(IHTMLElement* e, const wstring& _event) throw(...);
	static unique_ptr<vector<wstring>> Split(const wstring& source, wchar_t delimiter) throw();
	static void SuppressSecurityWarning() throw(...);
	static void DesuppressSecurityWarning() throw(...);
	static void WorkaroundForIE7(IHTMLDocument2* document) throw(...);
	static int GetIEMajorVersion() throw(...);
};
